package bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import common.RowMapper;

public class ThirdCategoryRowMapper implements RowMapper<ThirdCategory> {

	@Override
	public ThirdCategory mapper(ResultSet rs) throws SQLException {
		ThirdCategory tc=new ThirdCategory();
		tc.setThirdCategoryid(rs.getInt("third_categoryid"));
		tc.setName(rs.getString("name"));
		tc.setSecondCategory(rs.getInt("second_categoryid"));
		tc.setKeyword(rs.getString("keyword"));
		tc.setLabel(rs.getString("label"));
		tc.setIfonsale(rs.getInt("ifonsale"));
		tc.setDescribe(rs.getString("describe"));
		tc.setIfexist(rs.getInt("ifexist"));
		tc.setDiscountMsg(rs.getString("discount_msg"));
		tc.setPrice(rs.getDouble("price"));
		tc.setOnsaleTime(rs.getTimestamp("onsale_time"));
		tc.setEvaluateNum(rs.getInt("evaluate_num"));
		return tc;
	}

}
